<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-show</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<h1>v-show作用：根据表达式的值来控制元素的显示与隐藏(操作样式display:none)</h1>
<div id="app">
    <button @click="flag=!flag">切换</button>
  <img v-show="flag" src="https://img.shetu66.com/2023/06/27/1687828512585698.png" alt="图">
  <img v-show="!flag" src="https://static-cdn.zhixi.com/zx-wp/2022/11/T4.png" alt="图">
</div>
<script>
    new Vue({
        el: '#app',
        data: {
            flag: true,
            num: 0
        }
    })
</script>
</body>
</html>